#ifndef __FMAINIMPL_H__
#define __FMAINIMPL_H__

#include <QtGui/QSystemTrayIcon>
#include <QtGui/QMenu>

#include "fMain.h"

#include "STask.h"
#include "CTaskProviders.h"
#include "CTaskTreeItem.h"

#include "fTaskImpl.h"

#include <QDebug>

class fMainImpl : public QWidget
{
	Q_OBJECT
	
public:
	fMainImpl(QWidget *parent = 0);
	
private:
	fMain *m_fMain;
	CTaskProviders *m_taskProvider;

	void addSTaskInListView(STask *task);

	/*
		Tray icon
	*/
	QSystemTrayIcon *trayIcon;
	void createTrayIcon(void);
	// Menu
	QMenu *trayMenu;
	QAction *actionTrayOpen;
	QAction *actionTrayHide;
	QAction *actionTrayQuit;

private slots:
	void btAddTaskClicked();
	void btRefreshClicked();
	void eAddTaskTextChanged();
	void itemDoubleClicked(QTreeWidgetItem *item, int column);
};

#endif //__FMAINIMPL_H__
